package chenji.gunapi.events;

import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

public class BulletHitBlockEvent extends Event implements Cancellable {
	private static final HandlerList handlers = new HandlerList();

	@Override
	public HandlerList getHandlers() {
		return handlers;
	}

	public static HandlerList getHandlerList() {
		return handlers;
	}

	private boolean isCanceled;
	private Block b;
	private Player p;
	private boolean playEffect;

	public BulletHitBlockEvent(Player p, Block b) {
		this.b = b;
		this.p = p;
	}

	@Override
	public boolean isCancelled() {
		return this.isCanceled;
	}

	@Override
	public void setCancelled(boolean arg0) {
		this.isCanceled = arg0;
	}

	public Block getBlock() {
		return this.b;
	}

	public Player getPlayer() {
		return this.p;
	}
	public boolean isPlayEffect(){return this.playEffect;}
	public void setPlayEffect(boolean b){this.playEffect=b;}

}
